{// 引入标签库 }
<tagLib name="html" />

<script type="text/javascript">
	function del_img(id,o)
	{
		if(confirm("{%CONFIRM_DELETE_IMAGE}"))
		{
			$.ajax({ 
				url: ROOT+"?"+VAR_MODULE+"=TopicImage&"+VAR_ACTION+"=delete&id="+id, 
				data: "ajax=1",
				dataType: "json",
				success: function(obj){
					if(obj.status==1)
					{
						$(o).parent().remove();
					}
					else
					{
						alert(obj.data);
					}
				}
			});
		}
	}
	function modify_content(o)
	{
		$(o).parent().remove();
		$("textarea[name='content']").show();
	}
</script>
<include file="Public:header" />
<div class="main">
<div class="main_title">{%VIEW} <a href="{:u("TopicReply/index",array("topic_id"=>$vo['topic_id']))}" class="back_list">{%BACK_LIST}</a>

</div>
<div class="blank5"></div>
<form name="edit" action="__APP__" method="post" enctype="multipart/form-data">
<table class="form" cellpadding=0 cellspacing=0>
	<tr>
		<td colspan=2 class="topTd"></td>
	</tr>
	<tr>
		<td class="item_title">{%CONTENT}:</td>
		<td>
			<div style="word-break:break-all;">{$vo.content|nl2br|decode_topic}[<a href='javascript:;' onclick="modify_content(this);">{%MODIFY}</a>]</div>
			<textarea class="textarea" name="content" style="display:none;" >{$vo.content}</textarea>
		</td>
	</tr>
	<tr>
		<td class="item_title">{%TOPIC_IMG}:</td>
		<td>&nbsp;
			<foreach name="image_list" item="image_item">
				<div class="topic_image">
					<span onclick="del_img({$image_item.id},this)">x</span>
					<img src="{$image_item.path}" />
				</div>
			</foreach>
		</td>
	</tr>
	<tr>
		<td class="item_title"></td>
		<td class="item_input">
			<!--隐藏元素-->
			<input type="hidden" name="id" value="{$vo.id}" />
			<input type="hidden" name="{:conf("VAR_MODULE")}" value="TopicReply" />
			<input type="hidden" name="{:conf("VAR_ACTION")}" value="update" />
			<!--隐藏元素-->
			<input type="submit" class="button" value="{%EDIT}" />
		</td>
	</tr>
	<tr>
		<td colspan=2 class="bottomTd"></td>
	</tr>
</table>
<div class="blank5"></div>
</form>

</div>
<include file="Public:footer" />